﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;

namespace WebApplication1
{
    public partial class KetQuaTimKiem : System.Web.UI.Page
    {
        //BLLSanPham sanpham;
        //public KetQuaTimKiem()
        //{
            
        //}
        //public KetQuaTimKiem(BLLSanPham _sanpham):this()
        //{
        //    sanpham = _sanpham;
        //}
        
        protected void Page_Load(object sender, EventArgs e)
        {

                BLLSanPham sanpham = new BLLSanPham("",Request.QueryString["idloaisanpham"].ToString(), Request.QueryString["tensp"].ToString(), "", "", "", "", "", Request.QueryString["giasp"].ToString(), "");
                //phan trang
                //DataListsanpham.DataSource = sanpham.GetSptk;
                //DataListsanpham.DataBind();
                CollectionPager1.PageSize = 6;//so sp 1 trang
                CollectionPager1.DataSource = sanpham.GetSptk;
                CollectionPager1.BindToControl = DataListsanpham;
                DataListsanpham.DataSource = CollectionPager1.DataSourcePaged;
                if (sanpham.GetSptk.Count == 0)
                {
                    lbthongbao.Text = "Không có sản phẩm nào!";
                }
        }
    }
}
